#include "serial_interface_m.h"	//header
#include <p18f452.h>			//Board specific header

void Serial_Interupt_ISR(void);

//define high interrupt vector in assembly		


//define low interrupt vector in assembly		
#pragma code low_vector=0x18
void interrupt_at_low_vector(void)   
{
	_asm 
	GOTO Serial_Interupt_ISR 
	_endasm
}



#pragma interruptlow Serial_Interupt_ISR
void Serial_Interupt_ISR(void){
		//interrupts
	Serial_rxIsr();					//receive interrupt
	Serial_txIsr();					//transmit  
}
#pragma code

void main (void){
unsigned char msg[] = {"hello world"};
unsigned char character;

PORTB = 0;
Serial_Setup();
Serial_Setup_Interrupt();
Serial_AppendString (msg);
TRISB |= 0b00000001;

while(1){
	
if ((PORTB && 0x01) == 0){
	
	character = Serial_ReadBuffer();
	
	Serial_AppendString (character);

}
}
}